package intf;


/**
 * Created by IntelliJ IDEA.
 * User: sigolaev_va
 * Date: 25.01.2013
 * Time: 12:17:39
 * Interface to line object containing 2 points, start one and end one
 */
public interface ILine extends ICommonItem
{
  /**
   * First point
   *
   * @return {@link IPoint) with a 1st point of the line
   */
  IPoint startPoint();

  /**
   * Second point
   *
   * @return {@link IPoint) with a 2nd point of the line
   */
  IPoint endPoint();

  /**
   * Distance from point
   *
   * @param point {@link IPoint} to get distance
   * @return double with distance
   */
  double distance( IPoint point );

  /**
   * Length of this line
   *
   * @return double with length of line
   */
  double length();

  /**
   * Checks if line already connected to the tree and preprocessed
   * @return
   */
  boolean preprocessed();

  void markPreprocessed();
}
